import {
    Base
} from '../../utils/base.js'
class Home extends Base {
    constructor() {
        super()
    }

    //获取购物车总数
    getCart(parames, callback) {
        let url = "/ddaigo-platform/cart/get";
        this.commonRequest(url, parames, callback);
    }

    //获取活动列表接口
    getActivityList(parames, callback) {
        let url = "/ddaigo-platform/activity/activityList";
        this.commonRequest(url, parames, callback);
    }
    //活动详情
    getActivityDetail(parames, callback) {
        let url = "/ddaigo-platform/activity/getActivityDetail";
        this.commonRequest(url, parames, callback);
    }

    //活动商品
    getGoodsList(parames, callback) {
        let url = "/ddaigo-platform/activity/getActivityGoodsList";
        this.commonRequest(url, parames, callback);
    }
    //活动优惠券
    getActivityCoupon(parames, callback) {
        let url = "/ddaigo-platform/activity/getActivityCoupon";
        this.commonRequest(url, parames, callback);
    }
    //首页搜索
    searchActivityGoodsList(parames, callback) {
        let url = "/ddaigo-platform/activity/searchActivityGoodsList";
        this.commonRequest(url, parames, callback);
    }
    //获取商品详情
    getGoodsById(parames, callback) {
        let url = "/ddaigo-platform/goods/getGoodsById";
        this.commonRequest(url, parames, callback);
    }

    //加入购物车
    getAddCart(parames, callback) {
        let url = "/ddaigo-platform/cart/add";
        this.commonRequest(url, parames, callback);
    }
    // 绑定邀请码
    bindInviteCodeByMiniProgram(parames, callback) {
        let url = '/ddaigo-platform/code/bindInviteCodeByMiniProgram';
        this.commonRequest(url, parames, callback);
    }

}
module.exports = {
    Home
}